Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally skip building Torch with Intel MKL #538

Merged
merged 10 commits into from
Apr 5, 2024
Merged

Conversation

ashao
Copy link
Member

@ashao ashao commented Apr 2, 2024

On systems that have the Intel Compilers and/or the Intel Math Kernel library installed, the Caffe2 package that comes with Torch will unconditionally try to link in the MKL during the Torch backend. This however can lead to two types of failures:

  • Problems when compiling the Torch backend because the linker does not include the path to the MKL library path
  • Loading the Torch backend into RedisAI fails because the user does not expect to need to have the MKL library loaded.

To alleviate this, a new option "--no_torch_with_mkl" has been added to the smart build command that modifies the mkl.cmake file to prevent the detection of MKL.

Copy link
Member

@MattToast MattToast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just a couple of small things, but otherwise lgtm!!

smartsim/_core/_install/builder.py Show resolved Hide resolved
smartsim/_core/_install/builder.py Outdated Show resolved Hide resolved
smartsim/_core/_install/builder.py Outdated Show resolved Hide resolved
smartsim/_core/_cli/build.py Outdated Show resolved Hide resolved
smartsim/_core/_cli/build.py Outdated Show resolved Hide resolved
smartsim/_core/_cli/build.py Show resolved Hide resolved
Copy link
Collaborator

@al-rigazzi al-rigazzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick comment (I think it's quite superfluous but...)

smartsim/_core/_cli/build.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@al-rigazzi al-rigazzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for all that {food} for thoughts!

@ashao
Copy link
Member Author

ashao commented Apr 3, 2024

LGTM, thanks for all that {food} for thoughts!

Blame @MattToast I stole it from one of his torch-up branch

Copy link
Member

@MattToast MattToast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small nits, and pending test suite, but otherwise LGTM!!

smartsim/_core/_cli/build.py Outdated Show resolved Hide resolved
smartsim/_core/_install/builder.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Apr 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.70%. Comparing base (d462fd2) to head (f5a298c).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #538   +/-   ##
========================================
  Coverage    90.70%   90.70%           
========================================
  Files           65       65           
  Lines         4498     4498           
========================================
  Hits          4080     4080           
  Misses         418      418           

@ashao ashao merged commit 619d64b into CrayLabs:develop Apr 5, 2024
44 checks passed
@amandarichardsonn amandarichardsonn added area: build Issues related to builds, makefiles, installs, etc repo: smartsim Issues related to SmartSim infrastructure library type: feature Issues that include feature request or feature idea labels Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build Issues related to builds, makefiles, installs, etc repo: smartsim Issues related to SmartSim infrastructure library type: feature Issues that include feature request or feature idea
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants